package com.glsc.ngateway.common.api.platform.dto.system;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class SystemMainDto implements Serializable {

    @ApiModelProperty(value = "系统ID")
    private Integer opId;

    @ApiModelProperty(value = "系统名称")
    private String opName;

    @ApiModelProperty(value = "Gitee 项目id")
    private String programId;
//
//    @ApiModelProperty(value = "系统ID")
//    @Column(name = "op_style")
//    private Integer opStyle;

    @ApiModelProperty(value = "建设方式")
    private String opBuild;

    @ApiModelProperty(value = "供应商id")
    private Integer opSupport;

    @ApiModelProperty(value = "供应商名称")
    @Transient
    private String opSupportName;

    @ApiModelProperty(value = "系统编号")
    private String systemClassNo;

    @ApiModelProperty(value = "系统大类")
    private String mainClass;

    @ApiModelProperty(value = "系统类别")
    private String systemClass;

    @ApiModelProperty(value = "系统功能描述")
    private String systemSummary;

    @ApiModelProperty(value = "重要性")
    private String systemImportance;

    @ApiModelProperty(value = "单个归口部门id")
    private String belongDeptId;

    @ApiModelProperty(value = "信息系统对应项目信息")
    private String projectId;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "系统开发语言")
    private String systemDevelopLanguage;

    @ApiModelProperty(value = "保护等级")
    private String protectLevel;

    @ApiModelProperty(value = "互联网访问")
    private String internetAccess;

    @ApiModelProperty(value = "业务类型")
    private String businessType;

    @ApiModelProperty(value = "域名")
    private String domain;

    @ApiModelProperty(value = "生产客户端或网页访问路径")
    private String accessPath;

    @ApiModelProperty(value = "是否涉及公民个人信息数据")
    private String personData;

    @ApiModelProperty(value = "是否定级备案")
    private String isLevelRecord;

    @ApiModelProperty(value = "网络安全保护等级")
    private String netProtectLevel;

    @ApiModelProperty(value = "备案证号")
    private String recordNum;

    @ApiModelProperty(value = "系统上线时间")
    private String onlineTime;

    @ApiModelProperty(value = "购买费用")
    private String purchaseCost;

    @ApiModelProperty(value = "操作人员账号")
    private String opOperator;

    @ApiModelProperty(value = "操作人员姓名")
    private String opOperatorName;

    @ApiModelProperty(value = "系统标识，如amprod,ysp,glam,absmanage,glrm等")
    private String systemId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime insertTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;

    @ApiModelProperty(value = "项目经理oa列表")
    @Transient
    private List<String> memberManager;

    @ApiModelProperty(value = "项目经理名称列表")
    @Transient
    private List<String> memberManagerNameList;

    @ApiModelProperty(value = "系统管理员oa列表")
    @Transient
    private List<String> systemManager;

    @ApiModelProperty(value = "系统管理员名称列表")
    @Transient
    private List<String> systemManagerNameList;

    @ApiModelProperty(value = "运维管理员oa列表")
    @Transient
    private List<String> opsManager;

    @ApiModelProperty(value = "运维管理员名称列表")
    @Transient
    private List<String> opsManagerNameList;
//    @ApiModelProperty(value = "多个供应商code")
//    @Transient
//    private List<String> opSupport;
//
//    @ApiModelProperty(value = "多个供应商code")
//    @Transient
//    private List<String> opSupportName;

    @ApiModelProperty(value = "多个业务对口部门")
    @Transient
    private List<String> businessDepartment;

    @ApiModelProperty(value = "多个团队id")
    @Transient
    private List<String> opGroupId;

    @ApiModelProperty(value = "多个联系人id")
    @Transient
    private List<String> contactId;

    @ApiModelProperty(value = "多个联系人姓名")
    @Transient
    private List<String> contactName;

    @ApiModelProperty(value = "多个联系人信息")
    @Transient
    private List<SystemMainContactDto> contactInfo;


}
